import React from "react";
import styles from "./style.module.scss";
import cn from "classnames";
import { Button } from "antd";
import { LeftCircleOutlined } from "@ant-design/icons"; 

export const Desktop = ({ children, showBack, onBack }: any) => {
    return (<section className={cn(styles.desktop, !showBack && styles.desktopNoBack)}>
        <header>
            <h3>{ showBack && <Button onClick={onBack} type="text"><LeftCircleOutlined /></Button> }学校任务数据收集</h3>
        </header>
        <div>
            {children}
        </div>
    </section>);
};